Web application development tool

ABSTRACT

Method, system and computer program product are provided to increase the efficiency of the development of Java Enterprise Edition (J2EE) applications. A project may be divided into modules which may be developed by independent teams. The files within each module are classified as independent of resources in other modules or dependent. Independent files may be packaged into a single, integrated web application archive (WAR) file without further processing. Corresponding dependent files are compared and any conflicts are resolved. The resulting files may then be packaged into the WAR file.

TECHNICAL FIELD

The present invention relates generally to the development of webapplications and, in particular, to merging independently developedmodules into an integrated web application.

BACKGROUND ART

Large software projects are frequently divided into separate componentsto be completed by independent development teams. For example, in JavaEnterprise Edition (J2EE) projects, applications are typically dividedinto a presentation or user interface component, a business logiccomponent and a data component, each completed by an independentdevelopment team. Separating the development of an application in thismanner reduces the complexity of development by isolating each team fromthe effects of changes in other parts of the project implemented byother teams.

However, such a division of development effort may still be subject tounnecessary complexity in very large projects. Upon completion of theJ2EE components, the presentation and business components are generallycombined into a single archive (WAR) file. Although the two componentscould be packaged into multiple WAR files, separate packaging is notpreferable because each WAR file has its own configuration data and/orruntime resources. Thus, WAR files will not be able to share resources,such as a context root (configuration data) or a session (runtimeresource), with other WAR files.

Consequently, a need exists to independently develop the separatecomponents of a project while integrating the components into a singlelogical component at runtime.

SUMMARY OF THE INVENTION

The present invention provides method, system and computer programproduct to increase the efficiency of the development of Java EnterpriseEdition (J2EE) applications. A project may be divided into modules whichmay be developed by independent teams. The files within each module areclassified as independent of resources in other modules or dependent.Independent files may be packaged into a single, integrated webapplication archive (WAR) file without further processing. Correspondingdependent files are compared and any conflicts are resolved. Theresulting files may then be packaged into the WAR file.

Changes made to a module during development may be process and testedagainst modules previously integrated into the WAR file.

Similarly, subsequent revisions to a module may be incorporated into theWAR file after first being processed to resolve any conflicts with filesin the existing modules.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a representation of files available for an exemplary J2EEdevelopment project;

FIG. 2 is a representation of the files of FIG. 1 incorporated intoindependently developed modules;

FIG. 3 is a block diagram of the merge tool of the present invention;and

FIG. 4 is a flow chart of the merge process of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

FIG. 1 is a representation of some of the resources, such as files FileA 102, File B 104, File C 106, File D 108 and File E 110, which areavailable for an exemplary J2EE development project; it will beappreciated that many additional resources are typically present in aproject. The project is divided into modules to be developedindependently by different teams. Two such modules 200 and 220 areillustrated in FIG. 2; it will be appreciated that many additionalmodules are typically present in a project. The development team of thefirst module 200 has incorporated copies of some of the files: A 102, C106, D 108 and E 110; the copies have been designated files 1A 202, 1C206, 1D 208 and 1E 210. The development team of the second module 220has also incorporated copies of files C 106 and D 108 as well as copiesof file B 104; these copies have been designated files 2B 204, 2C 206and 2D 208.

Referring to the block diagram of FIG. 3 and the flow chart of FIG. 4,after the teams have completed their modules, all of the resources(files 1A, 1C, 1D, 1E, 2B, 2C and 2D) are received in a first section302 of the merge tool 300 of the present invention (step 400). In thefirst section 302 the resources of each module are examined to determinewhich are independent and do not correspond to any resource in adifferent module (step 402). An example of an independent file mightinclude an XML file which defines validation constraints for a STRUTSframework. In FIGS. 2 and 3, files 1A 203 and 1E 210 are used only inthe first module 200 while file 2B 202 is used only in the second module220. Thus, these three files are independent. The independent files areprocessed by a second section 304 of the tool 300 (step 404) andpackaged into the application's WAR file (step 406).

The remaining resources used in the first module 200 are each related toa corresponding resource in the second module: file 1C 206 is related tofile 2C 226; file 1D 208 is related to file 2D 228. For example, a fileto map error codes to error messages might be used in two modules.

In a third section 306 of the tool 300, the related files are compared(step 408). The information in two corresponding files (such as files 1Cand 2C) is examined to determine if any conflicts exist between the two.If no conflicts are present, the two files are merged (step 410) andpassed to the second section 304 to be packaged in the WAR file 308.

If a conflict in the information of two resources is identified, it mustbe determined whether the conflict is major or minor (step 412). Ifminor, a user may be notified with an appropriate message 310 (step414), allowing the user to decide how to proceed. While less preferable,the information in one file may alternatively be ignored (step 416),displaced by the information in the other file.

If the conflict is irreconcilable and, therefore, major, the user may benotified with an error message 310 (step 418), allowing the user todecide how to proceed. Alternatively, the process may abort (step 420),giving the development groups an opportunity to resolve the conflict byrevising one or both of the related modules.

After conflicts have been resolved, the merged files (files C and D inthe example) are passed to the second section 304 of the tool 300 to bepackaged in the WAR file 308 (step 406). The WAR file 308 is then readyto be installed into a J2EE application server as a J2EE application.

During development, a development team may want to make revisions to afile and determine if the revisions will perform as expected. The modulein which the revisions were made may be processed by the tool 300 andtested against other modules already integrated into the WAR file 308.

Similarly, after development, revisions or updates to a file may bemade. The module in which the revisions were made may be processed bythe tool 300 and integrated into the WAR file 308.

The objects of the invention have been fully realized through theembodiments disclosed herein. Those skilled in the art will appreciatethat the various aspects of the invention may be achieved throughdifferent embodiments without departing from the essential function ofthe invention. The particular embodiments are illustrative and not meantto limit the scope of the invention as set forth in the followingclaims.

1. A method for packaging a web application, comprising: receiving afirst web application module and a second web application module, thefirst and seconds modules each comprising a plurality of resources, eachresource comprising information; identifying: those resources of thefirst module which are related to a corresponding resource in the secondmodule; those resources of the first module which are independent ofresources in the second module; and merging each set of correspondingrelated resources.
 2. The method of claim 1, wherein merging a set ofrelated resources comprises determining if information in a resource inthe first module conflicts with information in the correspondingresource in the second module.
 3. The method of claim 2, wherein, ifinformation in a resource in the first module does not conflict withinformation in the corresponding resource in the second module, mergingthe resources comprises: merging the information of the resource in thesecond module with the information of the corresponding resource in thefirst module to create a merged resource; and packaging the mergedresource into a web application file.
 4. The method of claim 3, furthercomprising packaging the independent resources into the web applicationfile.
 5. The method of claim 2, wherein, if information in a resource inthe first module conflicts with information in the correspondingresource in the second module, merging the resources comprisesindicating to a user of the duplication.
 6. The method of claim 2,wherein, if information in a resource in the first module conflicts withinformation in the corresponding resource in the second module, mergingthe resources comprises aborting merging of the resources.
 7. The methodof claim 2, wherein, if information in a resource in the first moduleconflicts with information in the corresponding resource in the secondmodule, merging the resources comprises: removing the information in theresource of the first module; and continuing merging the resources. 8.The method of claim 1, wherein the first and second modules are WARfiles.
 9. The method of claim 8, wherein the web application file is aJ2EE archive file.
 10. A web application development tool, comprising: afirst web application module comprising a plurality of first resources,each first resource comprising information; a second web applicationmodule comprising a second plurality of resources, each second resourcecomprising information; means for identifying each first resource whichis related to a corresponding second resource; means for identifyingeach first resource which is independent of all of the second resources;and means for merging each set of corresponding related resources. 11.The web application development tool of claim 10, wherein the means formerging a set of related resources comprises means for determining ifinformation in a resource in the first module conflicts with informationin the corresponding resource in the second module.
 12. The webapplication development tool of claim 11, wherein, if information in aresource in the first module does not conflict with information in thecorresponding resource in the second module, the means for merging theresources comprises: merging the information of the resource in thesecond module with the information of the corresponding resource in thefirst module to create a merged resource; and packaging the mergedresource into a web application file.
 13. The web applicationdevelopment tool of claim 12, further comprising means for packaging theindependent resources into the web application file.
 14. The webapplication development tool of claim 13, wherein, if information in aresource in the first module conflicts with information in thecorresponding resource in the second module, the means for merging theresources comprises means for indicating to a user of the duplication.15. The web application development tool of claim 11, wherein, ifinformation in a resource in the first module conflicts with informationin the corresponding resource in the second module, the means formerging the resources comprises means for aborting the merging ofresources.
 16. The web application development tool of claim 11,wherein, if information in a resource in the first module conflicts withinformation in the corresponding resource in the second module, themeans for merging the resources comprises: means for removing theinformation in the resource of the first module; and means forcontinuing merging the resources.
 17. The web application developmenttool of claim 10, wherein the first and second modules are WAR files.18. The web application development tool of claim 17, wherein the webapplication file is a J2EE archive file.
 19. A computer program productof a computer readable medium usable with a programmable computer, thecomputer program product having computer-readable code embodied thereinfor packaging a web application, the computer-readable code comprisinginstructions for: receiving a first web application module and a secondweb application module, the first and seconds modules each comprising aplurality of resources, each resource comprising information;identifying: those resources of the first module which are related to acorresponding resource in the second module; and those resources of thefirst module which are independent of resources in the second module;and merging each set of corresponding related resources.
 20. Thecomputer program product of claim 19, wherein the instructions formerging a set of related resources comprises instructions fordetermining if information in a resource in the first module conflictswith information in the corresponding resource in the second module. 21.The computer program product of claim 20, wherein, if information in aresource in the first module does not conflict with information in thecorresponding resource in the second module, the instructions formerging the resources comprise instructions for: merging the informationof the resource in the second module with the information of thecorresponding resource in the first module to create a merged resource;and packaging the merged resource into a web application file.
 22. Thecomputer program product of claim 21, further comprising instructionsfor packaging the independent resources into the web application file.23. The computer program product of claim 20, wherein, if information ina resource in the first module conflicts with information in thecorresponding resource in the second module, the instructions formerging the resources comprise instructions for indicating to a user ofthe duplication.
 24. The computer program product of claim 20, wherein,if information in a resource in the first module conflicts withinformation in the corresponding resource in the second module, theinstructions for merging the resources comprise instructions foraborting the attempt to merge resources.
 25. The computer programproduct of claim 20, wherein, if information in a resource in the firstmodule conflicts with information in the corresponding resource in thesecond module, the instructions for merging the resources compriseinstructions for: removing the information in the resource of the firstmodule; and continuing merging the resources.
 26. The computer programproduct of claim 19, wherein the first and second modules are WAR files.27. The computer program product of claim 19, wherein the webapplication file is a J2EE archive file.